package com.restaurant.application.customer;

import com.nebutown.base.Unit;
import com.nebutown.base.data.View;
import com.restaurant.application.customer.support.CustomerData;
import com.restaurant.application.indexes.customerlist.mysql.CustomerListFromcustomerUidIF;
import com.restaurant.application.minifacade.data.MainBO;
import com.restaurant.application.minifacade.data.PersonBO;

/**
 * 客户基元
 *
 * @author Administrator
 */
public interface Customer extends Unit, CustomerListFromcustomerUidIF {

    String STATE_NORMAL = "正常";
    String STATE_BLACK = "黑名单用户";

    String TYPE = "101";
    String CHANNEL = "1";

    String CUSTOMER_NUMBER = "customerNumber=";

    /**
     * 新增客户(小程序中客户注册使用)
     *
     * @param data CustomerData
     * @return success 成功， other 失败
     */
    String init(CustomerData data);

    /**
     * 客户信息编辑 (小程序修改个人信息)
     *
     * @param data CustomerData
     * @return success 成功， other 失败
     */
    String update(CustomerData data);

    /**
     * 积分增加
     *
     * @param scores scores
     */
    void plusScores(int scores);

    /**
     * 积分减少
     *
     * @param scores 积分
     * @return success 成功， other 失败
     */
    String minusScores(int scores);

    /**
     * 小程序端获取客户个人信息
     *
     * @return PersonBean
     */
    PersonBO getPersonBO();

    /**
     * 个人中心
     *
     * @return RegisterBO
     */
    MainBO getMainBO();

    /**
     * 获取客户信息
     *
     * @return CustomerData
     */
    CustomerData findData();

    View modifyScores(String unitPosition);
}
